procedure TJQGMap3Frm.DirectionsRendererServiceCallbackEvent(Sender: TObject; AParams: TStringList);
begin
  with IWCGJQGMap3.JQGMapV3Options do
  begin
    Map.Options.Center.Latitude:= 40.364625;
    Map.Options.Center.Longitude:= -8.454519;
    Map.Options.Zoom:= 6;
    DirectionsRendererService.ContainerControl:= JQAuxDialog;
    DirectionsRendererService.Options.UseDirectionsFormCallback:= True;
    Map.ApplyProps;
    DirectionsRendererService.ApplyProps;
  end;
end;

with IWCGJQGMap3.JQGMapV3Options do
begin
  Map.Options.Center.Latitude:= 40.364625;
  Map.Options.Center.Longitude:= -8.454519;
  Map.Options.Zoom:= 10;
  RouteService.Options.Origin:= 'CentralGest, Avenida Cidade de Coimbra, 3050-374 Mealhada, Portugal';
  RouteService.Options.Destination:= 'Lisboa, Portugal';
  RouteService.Options.TravelMode:= gmstmDRIVING;
  RouteService.OnCallback.OnEvent:= DirectionsRendererServiceCallbackEvent;
end;
